﻿using Cl.Entity.DataBaseEntity.User;
using Cl.Model.DataBaseEntityDtos.User.Roles;
using Cl.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Cl.Service.Service.User.Roles
{
    public class RoleService : ClRepository<Role>, IRoleService
    {
        private ClRepository<Role> _roleRepository;
        public RoleService(ClRepository<Role> roleRepository)
        {
            _roleRepository = roleRepository;
        }
        public List<RoleOutDto> GetRoleList()
        {
            return _roleRepository.AsQueryable()
            .Select(x => new RoleOutDto(x) { }).ToList();
        }
    }
}
